package lab02.test34;

import java.util.ArrayList;
import java.util.List;

public class Test {

    public static void main(String[] args) {
        List<String>list = new ArrayList<String>();
        list.add("apple");
        list.add("grape");
        list.add("banana");
        list.add("pear");
        Object[] s = list.toArray();

        System.out.println("最小数是" + s[0]);
        System.out.println("最大数是" + s[s.length-1]);
        for (Object o: s){
            System.out.println(o);
        }
    }
}
